package cn.kgc;

import com.alibaba.excel.EasyExcel;

/**
 * @author Rock
 * @create 2020-07-25 8:45
 */
public class easyExcelTest {
    static String path = "F:\\GIT-Download-Project\\POI-and-EasyExcel\\POI-And-EasyExcel\\";

    public static void main(String[] args) {

        easyWrite();
    }

    public static void easyWrite(){
        String fileName = path + "EasyWrite.xlsx";
        /**
         *    fileName: 写的文件路径（没有会自动创建）
         *    Data.class: 用哪个类写
         *    sheet(): 写到哪个表中
         *    doWrite()： 写的数据
         *
         *    会自动关闭流
         */
        EasyExcel.write(fileName, Data.class).sheet("工作表1").doWrite(Utils.data());
    }
}
